<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>My JSP 'memberCenter.jsp' starting page</title>
	<link rel="stylesheet" href="assets/plugins/bootstrap/css/bootstrap.css"> 
	<link rel="stylesheet" href="assets/css/member/membercenter.css">
  </head>
  
  <body>
  	<div id="mainbox" class="container"> 
	    <div id="header">
	    	<div id="toplogo" style="background:url('assets/images/logo/back_top.jpg');">
	    			<div class="topsign">Java Share</div>
	    	</div>
	    	<div id="menu">
	    		<div class="navbar">
				  <div class="navbar-inner">
				    <div class="container">
				      <ul class="nav">
						  <li><a href="member_memberCenter">用户中心</a></li>
						  <li><a href="member_memberCenter?module=article">我的文章</a></li>
						  <li><a href="member_memberCenter?module=tiezi">帖子中心</a></li>
						  <li><a href="member_memberCenter?module=myinfo">我的信息</a></li>
						  <li><a href="member_logoff" class="pull-right">注销</a></li>
						  
						</ul>
				    </div>
				  </div>
				</div>
	    	</div>
	    </div>
	    <div id="content" >
	    	<div id="leftColumn">
	    		欢迎回来,<s:property value="member.name"/>
	    		<br/>
	    		注册时间,<s:date name="member.regtime" format="yyyy-MM-dd HH:mm:ss" />
	    		
	    		<br/>
	    		注册邮箱,<s:property value="member.email"/>
	    		
	    		<br/>
	    		权限级别,<s:property value="member.role"/>
	    		
	    		
	    		<div class="tiezi">
	    			<h3>我发的帖子</h3>
	    			<s:if test="member.tiezis.size > 0">
	    				<table class="table">
	    				<thead>
	    					<tr><td>话题</td><td>发表时间</td><td>标签</td></tr>
	    				</thead>
	    				<tbody>
	    					<s:iterator value="member.tiezis" id="tiezi">
	    					<tr>
	    						<td><s:property value="#tiezi.toppic" escapeHtml="false"/></td>
	    						<td><s:date name="#tiezi.postdate" format="yyyy-MM-dd HH:mm:ss"/></td>
	    						<td><s:property value="#tiezi.tags"/></td>
	    					</tr>
	    					</s:iterator>
	    				</tbody>
	    				</table>
	    				<a href="tiezi/addTiezi.jsp">我要发帖</a>
	    			</s:if>
	    			<s:else>
	    				<div>您还没有发过贴子哟，<a href="tiezi/addTiezi.jsp">我要发帖</a></div>
	    			</s:else>
	    		</div>
	    		<div class="tieziReply">
	    			<h3>我关注的帖子</h3>
	    			<s:if test="member.tzReplies.size > 0">
	    				<table class="table">
	    				<thead>
	    					<tr><td>帖子话题</td><td>回复内容</td><td>所属楼层</td></tr>
	    				</thead>
	    				<tbody>
	    					<s:iterator value="member.tzReplies" id="reply">
	    					<tr>
	    						<td><s:property value="#reply.tiezi.toppic"/></td>
	    						<td><s:property value="#reply.content.substring(10)" escapeHtml="false"/></td>
	    						<td><s:property value="#reply.locate"/></td>
	    					</tr>
	    					</s:iterator>
	    				</tbody>
	    				</table>
	    				<a href="tieziAction_getAllTiesByFenye">查看本站所有帖子</a>
	    			</s:if>
	    			<s:else>
	    				<div>您还没有关注过任何帖子哟，<a href="tieziAction_getAllTiesByFenye">查看本站所有帖子</a></div>
	    			</s:else>
	    		</div>
	    		<s:debug></s:debug> 
	    	</div>
	    	<div id="rightColumn">
	    	
	    	</div>
	    </div>
    </div>
  </body>
</html>
